<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<?php /** @var $this \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options */ ?>

<div class="fieldset-wrapper collapsable-wrapper opened" id="product-custom-options-wrapper">
    <div class="fieldset-wrapper-title">
        <strong class="title" data-toggle="collapse" data-target="#product-custom-options-content">
            <span><?php echo __('Custom Options') ?></span>
        </strong>
    </div>
    <div class="fieldset-wrapper-content in collapse" id="product-custom-options-content">
        <fieldset class="fieldset">
            <div class="message message-error" id="dynamic-price-warning" style="display: none;">
                <div class="message-inner">
                    <div class="message-content"><?php echo __('Bundle with dynamic pricing cannot include custom defined options. Options will not be saved.') ?></div>
                </div>
            </div>

            <div id="product_options_container">
                <div id="product_options_container_top"></div>
                <?php echo $this->getOptionsBoxHtml() ?>
            </div>

            <div class="actions">
                <?php echo $this->getChildHtml('import_button') ?>
                <?php echo $this->getAddButtonHtml() ?>
            </div>
        </fieldset>
    </div>
</div>

<script type="text/javascript">
require(['jquery'], function($){
    var priceType = $('#price_type');
    var priceWarning = $('#dynamic-price-warning');
    if (priceType && priceType.val() == 0 && priceWarning) {
        priceWarning.show();
    }
});
</script>
